<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
</head>
<body>
<div style="padding-bottom:200px" class="layui-form layuimini-form">

    <input type="hidden" name="id" value="{$res.id}" />
    <div class="layui-form-item">
            <label class="layui-form-label required">名称</label>
            <div class="layui-input-block">
                <input type="text"  value="{$res.supplier_name}" name="supplier_name" lay-verify="required" lay-reqtext="名称不能为空" placeholder="请输入名称"  class="layui-input">
            </div>
        </div>

    <div class="layui-form-item layui-form-text">
            <label class="layui-form-label required">分类</label>
            <div class="layui-btn-container">
                <button class="layui-btn "  id="add-standard-price">新增分类</button>
            </div>
        </div>
    <div style="display: none" id="bizpro_class">
       {$res.catestr}
    </div>
    <table class="layui-table" style="width:50%;margin-left: 150px;" id="standard-price">
        <colgroup>
            <col width="150">
            <col width="200">
            <col width="200">
            <col width="200">
        </colgroup>
        <thead>
        <tr>
            <th>一级分类</th>
            <th>二级分类</th>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        {if condition="$res.id"}
        {volist name="$res.bizpro_class_arr"  key="k" id="vv"}
        <tr>
            <td>

                <select name="bizpro_class[]" lay-filter="selectclass">
                    <option value="供应商分类"></option>
                {volist name="$res.catearr" id="catearr_vv"}
                <option value="{$catearr_vv.id}" {if condition="$vv.p_class==$catearr_vv.id"} selected {/if}>{$catearr_vv.title}</option>
                {/volist}

                </select>
            </td>
            <td>
                {volist name="$vv.se_class_all" id="se_class_all_vv"}
                <input type="checkbox" name="bizpro_seclass[]" value="{$se_class_all_vv.id}" lay-skin="primary" title="{$se_class_all_vv.title}" {if condition="in_array($se_class_all_vv.id,$vv.se_class)"} checked=""{/if}>
                {/volist}
            </td>
            <td>
                {if condition="$k>1"}
                <button type="button"   class="layui-btn delete">删除</button>
                {/if}
            </td>
        </tr>
        {/volist}
        {else}
        <tr>
            <td>

                <select name="bizpro_class[]" lay-filter="selectclass">
                    <option value="供应商分类"></option>
                    {volist name="$res.catearr" id="catearr_vv"}
                    <option value="{$catearr_vv.id}" {if condition="$vv.p_class==$catearr_vv.id"} selected {/if}>{$catearr_vv.title}</option>
                    {/volist}

                </select>
            </td>
            <td>

            </td>
            <td>

            </td>
        </tr>
        {/if}

        </tbody>
        </table>

    <div class="layui-form-item" id="area-picker" >
        <label class="layui-form-label required">地区</label>
        <div class="layui-input-inline">
            <select name="province" class="province-selector" data-value="{$res.province}" lay-filter="province-1">
                <option value="">选择省</option>
            </select>

        </div>
        <div class="layui-input-inline">
            <select name="city" class="city-selector" data-value="{$res.city}" lay-filter="city-1">
                <option value="">选择市</option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select name="area" class="county-selector" data-value="{$res.area}" lay-filter="county-1">
                <option value="">选择地区</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item" >
        <label class="layui-form-label required">详细地址</label>
        <div class="layui-input-block">
            <input type="text" id="address"   value="{$res.address}"   name="address" lay-verify="required" lay-reqtext="地址不能为空"  placeholder="请输入地址"    class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">联系人</label>
        <div class="layui-input-block">
            <input type="text"  value="{$res.relation_name}" name="relation_name" lay-verify="required" lay-reqtext="联系人不能为空" placeholder="请输入联系人"  class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">联系方式</label>
        <div class="layui-input-block">
            <input type="text"  value="{$res.relation_phone}" name="relation_phone" lay-verify="required|phone" lay-reqtext="联系方式不能为空" placeholder="请输入联系方式"  class="layui-input">
        </div>
    </div>

    <div class="layui-form-item" >
        <label class="layui-form-label required">账号</label>
        <div class="layui-input-block">
            <input type="text" id="bank_account"   value="{$res.bank_account}"   name="bank_account" lay-verify="required" lay-reqtext="账号不能为空"   placeholder="请输入账号"   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item" >
        <label class="layui-form-label required">账号姓名</label>
        <div class="layui-input-block">
            <input type="text" id="account_name"   value="{$res.account_name}"   name="account_name" lay-verify="required" lay-reqtext="账号姓名不能为空"  placeholder="请输入账号姓名"     class="layui-input">
        </div>
    </div>

    <div class="layui-form-item" >
        <label class="layui-form-label required">开户行</label>
        <div class="layui-input-block">
            <input type="text" id="open_bank"   value="{$res.open_bank}"   name="open_bank" lay-verify="required" lay-reqtext="开户行不能为空"  placeholder="请输入开户行"     class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea name="desc" placeholder="请输入备注" class="layui-textarea">{$res.desc}</textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">合作状态</label>
        <div class="layui-input-block">
            <input type="radio" name="audit_status" value="2" {if condition="$res.audit_status==2"} checked {/if} title="合作中">
            <input type="radio" name="audit_status" value="4" {if condition="$res.audit_status==4"} checked {/if}  title="终止合作" >
            {if condition="$res.from_client==2"}
            <input type="radio" name="audit_status" value="2" {if condition="$res.audit_status==1"} checked {/if} title="待审核">
            <input type="radio" name="audit_status" value="4" {if condition="$res.audit_status==3"} checked {/if}  title="驳回" >

            {/if}
        </div>
      </div>


<div class="layui-form-item">
    <div class="layui-input-block">
        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
    </div>
</div>
<!--</form>-->
</div>
{include file="public/footer" /}
<script src="/static/admin/supplier/saveinfo.js?v={$Think.const.TIMESTAMP}" charset="utf-8"></script>

</body>
</html>